using AnyCAD.Foundation;
using Avalonia.Controls;
using System;

namespace FeatureRecognization
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            this.DataContext = new MainViewModel(mRenderView);
            this.Opened += MainWindow_Opened;
        }

        private void MainWindow_Opened(object sender, EventArgs e)
        {
            this.mRenderView.SetSelectCallback((ViewerListener.AfterSelectHandler)((PickedResult result) =>
            {

            }));

            // 做些初始化的操作
            this.mRenderView.RequestDraw();
        }

        public void TreeView_SelectedItemChanged(object sender, SelectionChangedEventArgs e)
        {
            var treeView =  e.Source as TreeView;
            var node = treeView.SelectedItem as TreeViewItem;
            if (node == null)
                return;

        }
    }
}